cmake_minimum_required (VERSION 3.10)

project(example_webp)

custom_find_library(jpeg)
custom_find_library(webp)

if(jpeg_FOUND AND webp_FOUND)
    message(STATUS "build ${PROJECT_NAME}")
    aux_source_directory(. DIR_SRCS)
    add_executable(${PROJECT_NAME} ${DIR_SRCS})

    target_link_libraries(${PROJECT_NAME} webp)
    target_link_libraries(${PROJECT_NAME} jpeg)
endif()